/* Sokoban
 * HIT3243
 * Authors: Mike Blackney, Ben Ingarfield, Kurniawan
 */

#include "registrar.h"
#include "title.h"
#include "game.h"
#include "hiscore.h"
#include "options.h"
#include "help.h"
#include "level.h"

// Time between enemy placement:
const double ENEMY_INTERVAL [] = { 
	3.0f, // Easy
	2.5f, // Medium
	1.5f, // Hard
	1.0f, // Nonstop
};

const double THINK_TIME [] = {
	0.8f, // Short
	1.0f, // Med
	1.2f, // Long
	1.5f, // Painful
};

const int NUM_LIVES [] = {
	// This list is the number of *extra* lives:
	4, 2, 0,
};

const wchar_t* Registrar::kTitle   = L"Title";
const wchar_t* Registrar::kGame    = L"Game";
const wchar_t* Registrar::kHiScore = L"HiScore";
const wchar_t* Registrar::kOptions = L"Options";
const wchar_t* Registrar::kHelp = L"Help";

long long Registrar::iDifficulty = 1;
/*
long long Registrar::iAdvSpeed = 1;
long long Registrar::iAdvRespawn = 1;
long long Registrar::iAdvLives = 1;
*/

std::wstring Registrar::sGameType = L"New Game: Intermediate";

int   Registrar::iNumTurns = 0;
int   Registrar::iNumPushes = 0;
double Registrar::fTime = 0;
bool Registrar::bEnteringScore = false;
int Registrar::iLastLevel = 0;

Level *const   Registrar::pLevel   = &Level::Instance( );

CXFileEntity *Registrar::mdl_crate = NULL;
CXFileEntity *Registrar::mdl_ninja = NULL;
CXFileEntity *Registrar::mdl_wall = NULL;
CXFileEntity *Registrar::mdl_litwall = NULL;
CXFileEntity *Registrar::mdl_floor = NULL;
CXFileEntity *Registrar::mdl_targetfloor = NULL;

// Have the models been loaded to memory?
bool Registrar::bHasLoaded = false;

// Register the states
void Registrar::RegisterStates( ) {

	// First state registered is the initial state
	dxf::DXFRegisterState(kTitle, Title::Instance( ));

	// The rest of the states:
	dxf::DXFRegisterState(kGame, Game::Instance( ));
	dxf::DXFRegisterState(kHiScore, HiScore::Instance( ));
	dxf::DXFRegisterState(kOptions, Options::Instance( ));
	dxf::DXFRegisterState(kHelp, Help::Instance( ));
}

void Registrar::RegisterCommands( ) {
}

/*
int Registrar::GetNumLives( ) {
	return NUM_LIVES[iAdvLives];
}

double Registrar::GetRespawn( ) {
	return ENEMY_INTERVAL[iAdvRespawn];
}
*/

/*
double Registrar::GetMonThink( ) {
	return THINK_TIME[iAdvSpeed];
}
*/